package com.ces.knacky.model;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

import org.apache.commons.lang.builder.EqualsBuilder;

import com.ces.knacky.framework.model.AbstractTenantEntity;

/** @author Hibernate CodeGenerator */
public class Brand extends AbstractTenantEntity implements Serializable {
    /** persistent field */
    private Set itemBrands;

    /** full constructor */
    public Brand(String description, Date createTime, Date updateTime, com.ces.knacky.model.Flag flag, com.ces.knacky.model.Company company, com.ces.knacky.model.UserTable userTable, Set itemBrands) {
        this.description = description;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.flag = flag;
        this.company = company;
        this.user = userTable;
        this.itemBrands = itemBrands;
    }

    /** default constructor */
    public Brand() {
    }

    /** minimal constructor */
    public Brand(String description, com.ces.knacky.model.Flag flag, com.ces.knacky.model.Company company, com.ces.knacky.model.UserTable userTable, Set itemBrands) {
        this.description = description;
        this.flag = flag;
        this.company = company;
        this.user = userTable;
        this.itemBrands = itemBrands;
    }

    public Set getItemBrands() {
        return this.itemBrands;
    }

    public void setItemBrands(Set itemBrands) {
        this.itemBrands = itemBrands;
    }

    public boolean equals(Object other) {
        if ( !(other instanceof Brand) ) return false;
        Brand castOther = (Brand) other;
        return new EqualsBuilder()
            .append(this.getId(), castOther.getId())
            .isEquals();
    }


}
